package com.springcloud.test;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @Desc TODO
 * ----------------
 * @CLASS_NAME: Trace2Controller
 * ----------------
 * @Author jovi
 * ----------------
 * @Date 2020-03-31 09:55
 */
@RestController
@Slf4j
public class Trace2Controller {

    @GetMapping(value = "/trace-2")
    public String trace(HttpServletRequest request) {
        log.info("====<call trace-2,TraceId={},SpanId={}>====",
                request.getHeader("X-B3-TraceId"), request.getHeader("X-B3-SpanId"));

        return "Trace";
    }
}
